package com.swanclouds.redfish.chassis.domain;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.swanclouds.redfish.common.redfish.Status;

import java.util.Map;

public class Fans {

    /**指定风扇传感器的访问路径**/
    @JsonProperty("@odata.id")
    private String dataId;

    /**指定风扇传感器的低转速严重告警阈值**/
    @JsonProperty("LowerThresholdCritical")
    private String lowerThresholdCritical;

    /**指定风扇传感器的低转速紧急告警阈值**/
    @JsonProperty("LowerThresholdFatal")
    private String lowerThresholdFatal;

    /**指定风扇传感器的低转速轻微告警阈值**/
    @JsonProperty("LowerThresholdNonCritical")
    private String lowerThresholdNonCritical;

    /**指定风扇传感器的ID。**/
    @JsonProperty("MemberId")
    private String memberId;

    /**指定风扇传感器可读取的最高转速**/
    @JsonProperty("MaxReadingRange")
    private String maxReadingRange;

    /**指定风扇传感器可读取的最低转速**/
    @JsonProperty("MinReadingRange")
    private String minReadingRange;

    /**指定风扇传感器的名称**/
    @JsonProperty("Name")
    private String name;

    /**描述与此风扇关联的区域或设备**/
    @JsonProperty("PhysicalContext")
    private String physicalContext;

    /**指定风扇传感器的当前读数**/
    @JsonProperty("Reading")
    private String reading;

    /**指定风扇传感器读取到的
     风扇转速的单位
     包括：
     ● RPM
     ● Percent**/
    @JsonProperty("ReadingUnits")
    private String readingUnits;

    /** **/
    @JsonProperty("RelatedItem@odata.count")
    private String odataCount;

    /**指定风扇传感器的状态，
     包括：
     ● State：风扇传感器是
     否使能
     ● Health：风扇传感器健
     康状态
     ● Severity：风扇传感器
     的自定义健康状态**/
    @JsonProperty("Status")
    private Status status;

    /**指定风扇传感器的高转速严重告警阈值**/
    @JsonProperty("UpperThresholdCritical")
    private String upperThresholdCritical;

    /**指定风扇传感器的高转速紧急告警阈值**/
    @JsonProperty("UpperThresholdFatal")
    private String upperThresholdFatal;

    /**指定风扇传感器的高转速轻微告警阈值**/
    @JsonProperty("UpperThresholdNonCritical")
    private String upperThresholdNonCritical;

    /**指定风扇传感器的部件号**/
    @JsonProperty("PartNumber")
    private String partNumber;

    /**指定风扇传感器自定义信息**/
    @JsonProperty("Oem")
    private Map<String, Object> oem;

    public String getDataId() {
        return dataId;
    }

    public String getLowerThresholdCritical() {
        return lowerThresholdCritical;
    }

    public String getLowerThresholdFatal() {
        return lowerThresholdFatal;
    }

    public String getLowerThresholdNonCritical() {
        return lowerThresholdNonCritical;
    }

    public String getMemberId() {
        return memberId;
    }

    public String getMaxReadingRange() {
        return maxReadingRange;
    }

    public String getMinReadingRange() {
        return minReadingRange;
    }

    public String getName() {
        return name;
    }

    public String getPhysicalContext() {
        return physicalContext;
    }

    public String getReading() {
        return reading;
    }

    public String getReadingUnits() {
        return readingUnits;
    }

    public String getOdataCount() {
        return odataCount;
    }

    public Status getStatus() {
        return status;
    }

    public String getUpperThresholdCritical() {
        return upperThresholdCritical;
    }

    public String getUpperThresholdFatal() {
        return upperThresholdFatal;
    }

    public String getUpperThresholdNonCritical() {
        return upperThresholdNonCritical;
    }

    public String getPartNumber() {
        return partNumber;
    }

    public Map<String, Object> getOem() {
        return oem;
    }

    @Override
    public String toString() {
        ObjectMapper objectMapper = new ObjectMapper();
        try {
            return objectMapper.writeValueAsString(this);
        } catch (JsonProcessingException e) {
        }
        return "Fans{" +
                "@odata.id='" + dataId + '\'' +
                "Name='" + name + '\'' +
                "LowerThresholdCritical='" + lowerThresholdCritical + '\'' +
                "LowerThresholdFatal='" + lowerThresholdFatal + '\'' +
                "LowerThresholdNonCritical='" + lowerThresholdNonCritical + '\'' +
                "MaxReadingRange='" + maxReadingRange + '\'' +
                "MemberId='" + memberId + '\'' +
                "PhysicalContext='" + physicalContext + '\'' +
                "Reading='" + reading + '\'' +
                "ReadingUnits='" + readingUnits + '\'' +
                "RelatedItem@odata.count='" + odataCount + '\'' +
                "Status='" + status + '\'' +
                "UpperThresholdCritical='" + upperThresholdCritical + '\'' +
                "UpperThresholdFatal='" + upperThresholdFatal + '\'' +
                "UpperThresholdNonCritical='" + upperThresholdNonCritical + '\'' +
                "PartNumber='" + partNumber + '\'' +
                "Oem='" + oem + '\'' +
                '}';
    }

}